<template>
    <div>
        <Modal v-model="modal.search" title="高级搜索" width="1020">
            <Form ref="searchForm" :model="searchForm" :label-width="120">
                <Row>
	<i-col span="12">
	<FormItem label="快递费模板编号"><Row>
	<i-col span="11">
	<FormItem prop="idMin">
	<InputNumber v-model="searchForm.idMin" placeholder="请输入开始快递费模板编号" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="idMax">
	<InputNumber v-model="searchForm.idMax" placeholder="请输入结束快递费模板编号" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="快递费模板标题" prop="title">
	<Input v-model="searchForm.title" placeholder="请输入快递费模板标题" clearable/>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="发货地" prop="expressPlace">
	<Input v-model="searchForm.expressPlace" placeholder="请输入发货地" clearable/>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="是否包邮" prop="expressFree">
	    
	        <Select v-model="searchForm.expressFree" placeholder="是否包邮" filterable clearable>
	          <Option
	            v-for="(option, index) in expressFreeSelect"
	            :value="option.value"
	            :key="index"
	          >{{option.displayValue}}</Option>
	        </Select>
	    
	</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="计价方式" prop="valuationType">
	    
	        <Select v-model="searchForm.valuationType" placeholder="计价方式" filterable clearable>
	          <Option
	            v-for="(option, index) in valuationTypeSelect"
	            :value="option.value"
	            :key="index"
	          >{{option.displayValue}}</Option>
	        </Select>
	    
	</FormItem>
</i-col><i-col span="12">
	<FormItem label="默认快递费"><Row>
	<i-col span="11">
	<FormItem prop="defaultFeeMin">
	<InputNumber v-model="searchForm.defaultFeeMin" placeholder="请输入开始默认快递费" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="defaultFeeMax">
	<InputNumber v-model="searchForm.defaultFeeMax" placeholder="请输入结束默认快递费" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="默认规格"><Row>
	<i-col span="11">
	<FormItem prop="defaultSpecMin">
	<InputNumber v-model="searchForm.defaultSpecMin" placeholder="请输入开始默认规格" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="defaultSpecMax">
	<InputNumber v-model="searchForm.defaultSpecMax" placeholder="请输入结束默认规格" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="默认递增规格"><Row>
	<i-col span="11">
	<FormItem prop="defaultIncrementSpecMin">
	<InputNumber v-model="searchForm.defaultIncrementSpecMin" placeholder="请输入开始默认递增规格" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="defaultIncrementSpecMax">
	<InputNumber v-model="searchForm.defaultIncrementSpecMax" placeholder="请输入结束默认递增规格" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="默认递增快递费"><Row>
	<i-col span="11">
	<FormItem prop="defaultIncrementFeeMin">
	<InputNumber v-model="searchForm.defaultIncrementFeeMin" placeholder="请输入开始默认递增快递费" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="defaultIncrementFeeMax">
	<InputNumber v-model="searchForm.defaultIncrementFeeMax" placeholder="请输入结束默认递增快递费" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="默认包邮条件"><Row>
	<i-col span="11">
	<FormItem prop="defaultFreeConditionMin">
	<InputNumber v-model="searchForm.defaultFreeConditionMin" placeholder="请输入开始默认包邮条件" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="defaultFreeConditionMax">
	<InputNumber v-model="searchForm.defaultFreeConditionMax" placeholder="请输入结束默认包邮条件" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="默认包邮金额"><Row>
	<i-col span="11">
	<FormItem prop="defaultFreeMaxPaymentMin">
	<InputNumber v-model="searchForm.defaultFreeMaxPaymentMin" placeholder="请输入开始默认包邮金额" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="defaultFreeMaxPaymentMax">
	<InputNumber v-model="searchForm.defaultFreeMaxPaymentMax" placeholder="请输入结束默认包邮金额" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="快递费模板说明" prop="description">
	<Input v-model="searchForm.description" placeholder="请输入快递费模板说明" clearable/>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="是否默认" prop="isDefault">
	    
	        <Select v-model="searchForm.isDefault" placeholder="是否默认" filterable clearable>
	          <Option
	            v-for="(option, index) in isDefaultSelect"
	            :value="option.value"
	            :key="index"
	          >{{option.displayValue}}</Option>
	        </Select>
	    
	</FormItem>
</i-col><i-col span="12">
	<FormItem label="版本号"><Row>
	<i-col span="11">
	<FormItem prop="versionMin">
	<InputNumber v-model="searchForm.versionMin" placeholder="请输入开始版本号" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="versionMax">
	<InputNumber v-model="searchForm.versionMax" placeholder="请输入结束版本号" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="创建时间"><Row>
	<i-col span="11">
	<FormItem prop="createTimeMin">
	<DatePicker @on-change="searchForm.createTimeMin=$event" :value="searchForm.createTimeMin" placeholder="请输入开始创建时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="createTimeMax">
	<DatePicker @on-change="searchForm.createTimeMax=$event" :value="searchForm.createTimeMax" placeholder="请输入结束创建时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="更新时间"><Row>
	<i-col span="11">
	<FormItem prop="updateTimeMin">
	<DatePicker @on-change="searchForm.updateTimeMin=$event" :value="searchForm.updateTimeMin" placeholder="请输入开始更新时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="updateTimeMax">
	<DatePicker @on-change="searchForm.updateTimeMax=$event" :value="searchForm.updateTimeMax" placeholder="请输入结束更新时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="是否激活" prop="isActive">
	    
	        <Select v-model="searchForm.isActive" placeholder="是否激活" filterable clearable>
	          <Option
	            v-for="(option, index) in isActiveSelect"
	            :value="option.value"
	            :key="index"
	          >{{option.displayValue}}</Option>
	        </Select>
	    
	</FormItem>
</i-col>
</Row>

            </Form>
            <div slot="footer">
                <Button type="text" size="large" @click="resetForm">清空</Button>
                <Button type="text" size="large" @click="cancelModal">取消</Button>
                <Button type="primary" size="large" @click="searchOkModal" :loading="loading.search">查询</Button>
            </div>
        </Modal>
    </div>
</template>

<script>
	import * as utils from '@/api/utils-v2'
	import * as ResponseStatus from '@/api/response-status'
    export default {
        name: 'ExpressTemplateSearch',
        data() {
            return {
                modal: {
                    search: false
                },
                loading: {
                    search: false
                },
                urls: {
                    searchUrl: '/express-template/admin/pager-cond'
                },
				dataDictCodes: ['IS_ACTIVE','EXPRESS_FREE','EXPRESS_SPEC','EXPRESS_IS_DEFAULT'],
				dataDictItems: {},
				isActiveSelect:[],
				expressFreeSelect:[],
				valuationTypeSelect:[],
				isDefaultSelect:[],
                searchForm: {
                    pageNo: 1,
                    pageSize: 10,
                    sortColumn: null,
                    sortOrder: null,
                    id: null,
idMin: null, 
idMax: null, 
title: null,
expressPlace: null,
expressFree: null,
expressFreeMin: null, 
expressFreeMax: null, 
valuationType: null,
valuationTypeMin: null, 
valuationTypeMax: null, 
defaultFee: null,
defaultFeeMin: null, 
defaultFeeMax: null, 
defaultSpec: null,
defaultSpecMin: null, 
defaultSpecMax: null, 
defaultIncrementSpec: null,
defaultIncrementSpecMin: null, 
defaultIncrementSpecMax: null, 
defaultIncrementFee: null,
defaultIncrementFeeMin: null, 
defaultIncrementFeeMax: null, 
defaultFreeCondition: null,
defaultFreeConditionMin: null, 
defaultFreeConditionMax: null, 
defaultFreeMaxPayment: null,
defaultFreeMaxPaymentMin: null, 
defaultFreeMaxPaymentMax: null, 
description: null,
isDefault: null,
isDefaultMin: null, 
isDefaultMax: null, 
version: null,
versionMin: null, 
versionMax: null, 
createTime: null,
createTimeMin: null, 
createTimeMax: null, 
updateTime: null,
updateTimeMin: null, 
updateTimeMax: null, 
isActive: null,
isActiveMin: null, 
isActiveMax: null, 

                }
            }
        },
        computed: {},
        mounted() {
			utils.getDataDict(this.dataDictCodes).then(response => {
			  if (response) {
				this.dataDictItems = response
				utils.getSelectDictItems(this, 'IS_ACTIVE', 'isActive', 'isActiveSelect')
				utils.getSelectDictItems(this, 'EXPRESS_FREE', 'expressFree', 'expressFreeSelect')
				utils.getSelectDictItems(this, 'EXPRESS_SPEC', 'valuationType', 'valuationTypeSelect')
				utils.getSelectDictItems(this, 'EXPRESS_IS_DEFAULT', 'isDefault', 'isDefaultSelect')
			  }
			}).catch(error => {
			  console.log(error)
			})
		},
        methods: {
            resetForm() {
                this.$refs.searchForm.resetFields()
            },
            cancelModal(modal) {
                this.modal.search = false
            },
            searchOkModal(modal) {
                this.modal.search = false
                this.$emit('searchTable', true)
            }
        }
    }
</script>

<style>
</style>
